home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows News 2010 Summer - Disc 1
/
WN_Ete2010_CD1.iso
/
Onglet5
/
Weezo
/
Weezo setup.exe
/
{code_appDir}
/
www
/
res
/
bookmarks
/
std
/
mobileIndex.php
< prev
next >
Wrap
PHP Script
|
2010-05-19
|
3KB
|
112 lines
<?php
/**
* RSS feed viewer
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category NA
* @package NA
* @author Nicolas Bruley / Peer 2 World <contact@weezo.net>
* @copyright 2005-2009 Nicolas Bruley / Peer 2 World
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id:$
* @link http://www.weezo.net
* @since File available since Release 1.4.0
*/
require(INCLUDE_DIR.'mobileFunctions.php');
define('THUMBNAILS_SIZE',48);
/**
* @desc Init mobile specific data
*
*/
function mobileBookmarksInitResourceData(){
if(cfRGetVar('mobileParametersLoaded')) return;
cfRSetVar('mobileParametersLoaded',1);
}
/**
* @desc Insert javascript
*/
function mobileBookmarksInsertScripts(){
?>
<script type="text/javascript">
function go(l){window.open(l,"_blank")}
</script>
<?php
}
// Init mobile specific data
mobileBookmarksInitResourceData();
/*
***************************************************************************************************************************
* Insert HEAD, javascripts and comForm
***************************************************************************************************************************
*/
mfInsertHead();
outInsertStandardComForm($_SERVER['PHP_SELF']);
mobileBookmarksInsertScripts();
/*
***************************************************************************************************************************
* Generate bookmarks tree (not treeView...) and thumbnails
***************************************************************************************************************************
*/
bfGenerateBookmarksTree();
$bookmarks=cfRGetVar('bookmarks');
$displayThumbnails=cfRGetVar('displayThumbnails');
// List table
echo mfListTable();
foreach (cfRGetVar('bookmarks') as $k=>$item){
// Thumbnail
if($item['type']=='b') {
// Main link
$link=$item['url'];
// Title
$title=cfUTF8Encode($item['name']);
// Thumbnail
if($displayThumbnails && bfThumbnailFile($item['url'])) {
$src=cfExtImage(bfThumbnailFile($item['url']),THUMBNAILS_SIZE,THUMBNAILS_SIZE);
$favicon=0;
}
// Or favicon if thumbnail not yet generated or if no thumbnails
else {
$src=mfFaviconLink($item['url']);
$favicon=1;
}
// No thumbnail yet
if(!$src) $src=outIcon('loading');
/**
* Formated list item
*/
if($favicon)
echo mfListItem('onclick="go(\''.$link.'\')"','<img src="'.$src.'" class="imgW16">',false,'<div class="lits">'.$title.'</div>'.$link,false,outImage(outIcon('go')),false);
else
echo mfListItem('onclick="go(\''.$link.'\')"',outImage($src,false,'class="frLi16"','width:'.THUMBNAILS_SIZE.';height:'.THUMBNAILS_SIZE),false,'<div class="lits">'.$title.'</div>'.$link,false,outImage(outIcon('go')),false);
}
}
?>
</table></body></html>